Skip to content

SwaggerUI fails when running on IIS/dev-server : Service Unavailable … #193

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

JohannesFinsveen
Copy link
Contributor

SwaggerUI fails when running on IIS/dev-server : Service Unavailable /swagger/v2/swagger.json.
However, opening path_to_app/swagger/v2/swagger.json in browsers produces the json-file.
Changing the SwaggerEndpoint to "v2/swagger.json" makes the UI appear, but the urls then used by the "execute"-buttons at the endpoints seems make the requestes at host/controller_route, that is miss the virtual directory. Adding a OpenApiServer seems to fix this.

…/swagger/v2/swagger.json. However, opening _path_to_app_/swagger/v2/swagger.json in browser produces the json-file. Changing the SwaggerEndpoint to "v2/swagger.json" makes the UI appear, but the urls then used by the "execute"-buttons at the endpoints seems make the requestes at host/controller_route, that is miss the virtual directory. Adding a OpenApiServer seems to fix this.
@JohannesFinsveen
Copy link
Contributor Author

JohannesFinsveen commented Sep 24, 2024

Naming extended from: https://swagger.io/docs/specification/api-host-and-base-path/

Https://data.ssb.no/folder1_on_iis/subfolder2_on_iis/route_prefix_in_app/controller_route...
\____________ host / \______________ ISS Path _______/\ _ _ _ _ route_prefix __/\ controller_route __

@JohannesFinsveen JohannesFinsveen marked this pull request as draft September 25, 2024 13:39
@JohannesFinsveen JohannesFinsveen deleted the fix/swagger-on-iis branch September 25, 2024 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant